package com.dd.service;

import com.dd.dao.CommodityMapper;
import com.dd.pojo.Commodity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommodityServiceImpl implements CommodityService{
    @Autowired
    CommodityMapper commodityMapper;

    public List<Commodity> selectcom() {
        return commodityMapper.selectcom();
    }

    public int addcom(Commodity commodity) {
        return commodityMapper.addcom(commodity);
    }

    public int updatecombyid(Commodity commodity) {
        return commodityMapper.updatecombyid(commodity);
    }

    public int deletecombyid(int id) {
        return commodityMapper.deletecombyid(id);
    }

    public List<Commodity> selectbycname(String cname) {
        return commodityMapper.selectbycname(cname);
    }
}
